<template>
  <div class="write">
    <div class="title">
      <span></span>
      <span>写信</span>
    </div>
    <el-form
      :model="numberValidateForm"
      ref="numberValidateForm"
      label-width="100px"
      class="demo-ruleForm content"
    >
      <div class="inner bottom">
        <span>收件人：</span>
        <el-input class="writeContent addressee" placeholder="客服" disabled></el-input>
      </div>
      <div class="inner one">
        <span>*邮件主题：</span>
        <el-input class="writeContent mailTitle" v-model="input2" placeholder="请输入内容"></el-input>
      </div>
      <div class="inner">
        <span>文本阈（可选）:</span>
        <el-input
          type="textarea"
          class="wenBen"
          resize="none"
          :rows="4"
          placeholder="请输入内容"
          v-model="textarea"
        ></el-input>
      </div>
      <div class="inner_btn">
        <el-button type="success" @click="sub">立即提交</el-button>
      </div>
    </el-form>
  </div>
</template>

<script>
import $ from "jquery";
export default {
  data() {
    return {
      email: "",
      input2:'',
      textarea:'',
      isDisabled:true
    };
  },
  created() {

  },
  methods:{
    sub(){
       u.writeLetters(
      {
        sendTitle:this.input2,
        sendContent:this.textarea,
      },
      data => {
        if(data||data.code==200){
        this.$router.push({path: '/hairbox'});
        }
      }
    );

    }
  }
};
</script>

<style lang="less" scoped>
.write {
  height: 100%;
  background: white;
  .title {
    height: 50px;
    line-height: 50px;
    font-size: 16px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border-bottom: 1px solid #f4f5f6;
    span:nth-child(1) {
      margin: 0px 10px 0px 20px;
      margin-left: 20px;
      line-height: 50px;
      background: #ffb001;
      width: 5px;
      height: 18px;
      display: inline-block;
    }
  }
  .content {
    // border: 1px solid #000;
    margin-top: 30px;
    padding-left: 20px;

    .inner {
      display: flex;
      span {
        color: #3d3d3d;
        font-size: 14px;
        display: inline-block;
        width: 134px;
      }
      .writeContent {
        width: 358px;
      }
      .wenBen {
        width: 358px;
        height: 100px;
      }

    }
    .one {
      margin-bottom: 30px;
    }
    .bottom {
      margin-bottom: 30px;
    }
    
    .inner_btn {
      margin-left: 165px;
      margin-top: 50px;
      .el-button--success {
        width: 118px;
        height: 40px;
        color: #fff;
        background-color: #ffb001;
        border-radius: 2px;
        border-color: #ffb001;
      }
    }
  }
}
</style>
<style>
.el-input.is-disabled .el-input__inner {
    background-color: #e4e7ed;
}
</style>
